# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Adria Arrufat <swiftscythe at gmail dot com>

pkgname=ugrep
pkgver=3.11.2
pkgrel=1
pkgdesc='ultra fast grep with interactive TUI, fuzzy search, boolean queries, hexdumps and more'
arch=(loong64 x86_64)
license=(BSD)
url="https://github.com/Genivia/$pkgname"
depends=(bzip2
         lz4
         pcre2
         xz
         zlib
         zstd)
_archive="$pkgname-$pkgver"
source=("$url/archive/v$pkgver/$_archive.tar.gz")
sha256sums=('a314cc6fe149eef9bc0f0d69c6b331d9d4491a100677c1b3fbb2159806cca2dd')

build() {
	cd "$_archive"
	./configure --prefix /usr
}

package() {
	cd "$_archive"
	make DESTDIR="$pkgdir" install
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.txt
}
